package factory;

/**
 * @author 颜培轩
 * @date 2018年08月16日  上午 10:31
 */
public class Singleton {

    private Singleton() {
    }

    public static Singleton getInstance() {
        return InnerClass.singleton;
    }

    private static class InnerClass {
        private static Singleton singleton = new Singleton();
    }
}
